<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>跳转中...</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1" name="viewport" />
</head>

<body>
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" type="text/javascript"></script>
    <script src="js/template.js" type="text/javascript"></script>
    <script src="js/base.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function() {
            bee.wxConfig(function() {
                bee.hideAllNonBaseMenuItem();
            }, function(res) {});

            var code = bee.getQueryString('code');
            if (code) {
                bee.request({
                    url: '/Index/Index/is_login',
                    data: {
                        code: code,
                        shop_id: bee.getQueryString('user_id')
                    },
                    bind: function(data) {
                        if (window.location.href.indexOf('first.html') === -1 &&
                            window.location.href.indexOf('job.html') === -1) {
                            bee.cache('user_id', data.shop_id);
                            bee.open('first.html');
                        }
                    },
                    success: function(data) {
                        bee.cache('user_id', data.shop_id);
                        bee.open(bee.cache('redirectUri'));
                    }
                });
            }
        });
    </script>
</body>

</html>
